package com.pawn.jwt.utils;

import java.util.HashMap;
import java.util.Map;

/**
 * @program: springboot-1-cache
 * @description:
 * @author: Dawson.Zhang
 * @create: 2020-08-13
 **/
public class ResUtil extends HashMap {

    public static ResUtil ERROR(String msg, Object data) {
        ResUtil resUtil = new ResUtil();
        resUtil.put("code", 500);
        resUtil.put("msg", msg);
        resUtil.put("data", data);
        return resUtil;
    }

    public static ResUtil SUCCESS(String msg, Object data) {
        ResUtil resUtil = new ResUtil();
        resUtil.put("code", 200);
        resUtil.put("msg", msg);
        resUtil.put("data", data);
        return resUtil;
    }
}
